<%@ page contentType="text/html; charset=UTF-8" language="java" import="com.util.*,java.util.*" errorPage="/error.jsp" %>
<%@ page import="com.config.SystemGlobals" %>
<%@ page import="com.beans.log.*" %>
<%@ page import="com.business.log.*" %>
<%@ page import="com.beans.music.*" %>
<%@ page import="com.business.music.*" %>
<%@ page import="com.beans.link.*" %>
<%@ page import="com.business.link.*" %>
<%@ page import="com.beans.user.*" %>
<%@ page import="com.business.user.*" %>
<%  UserListBus uis=new UserListBus();
	LogListBus llb=new LogListBus();
	LogReplyBus lrb=new LogReplyBus();
	LogTypeBus ltb=new LogTypeBus();
	MusicTypeBus mtb=new MusicTypeBus();
	List logList;
	MusicListBus mlb=new MusicListBus();
	List musicList;
	String musictypeId=request.getPathInfo();	
	StringTokenizer t=new StringTokenizer(musictypeId,"/");
	int number=t.countTokens();
	String username=t.nextToken();	
	UserInfo ui=uis.getUserInfo(username);
	String title=username+"的音乐";  
%>
<%@ include file="/header.jsp"%>
<body>
<div id=container>
<%@ include file="/top.jsp"%>
<div id=Tbody>
<div id=mainContent>
<div id=innermainContent>
<div id=mainContent-topimg></div>
<DIV class=Content-body style="TEXT-ALIGN: left">
<%
   if(t.hasMoreTokens()) {
        musictypeId=t.nextToken();
    	musictypeId=musictypeId.replace(".html","");	
		int id=Integer.parseInt(musictypeId);
     	MusicType pt=mtb.getMusicTypeById(id);	
		musicList=mlb.getAllMusicByTypeID(id);
%>
您选择的音乐盒是:<font color=red><%=pt.getMusictypeName()%></font>,共有<%=musicList.size()%>张音乐
<br/>
描述：<%=pt.getMusictypeMemo()%>
<%
if(musicList==null||musicList.size()==0) {
%>
<center color="red">没有音乐<br/>
<a href="javascript:history.back()">返回</a></center>
<%
} else {
%>
<table cellSpacing=10 cellPadding=10 width="100%">
<tbody>
<tr>
<th>音乐名</th><th>歌手</th><th>专辑</th><th>URL</th>
</tr>
<%
for(int i=0;i<musicList.size();i++) {
MusicInfo mi=(MusicInfo)musicList.get(i);
%>
  <tr border="0">
<td><a title="<%=mi.getMusicMemo()%>,点击试听" href="play/temp/<%=mi.getMusicNo()%>.html" target="_blank"><b><%=mi.getMusicName()%></b></a>
<br/>
<%=mi.getAddTime()%><td><%=mi.getSinger().equals("")?"未提供":mi.getSinger()%></td>
<td><%=mi.getClassName().equals("")?"未提供":mi.getClassName()%></td>
<td align="center"><a href="play/temp/<%=mi.getMusicNo()%>.html">复制地址</a></td>
</tr>
<%	
	}
%>		
</tbody>
</table>
<p align="center"><a href="playlist/temp/<%=musictypeId%>" target="_blank">播放此音乐盒</a></p>

<center><a href="javascript:history.back()">返回</a></center>
<%	
	}
}else{
	List musictypeList=mtb.getAllTypes(username);
%>
	<b>请选择您所要浏览的音乐盒：</b><br /><br/>
	
<%
	for(int i=0;i<musictypeList.size();i++){
	MusicType pt=(MusicType)musictypeList.get(i);
	int id=Integer.parseInt(pt.getMusictypeId());
	musicList=mlb.getAllMusicByTypeID(id);
%>
<a href="music/<%=username%>/<%=pt.getMusictypeId()%>.html">
<b><%=pt.getMusictypeName()%></b>
<br/>
描述：<%=pt.getMusictypeMemo()%></a>
<br/>统计：共有<%=musicList.size()%>张音乐
<br/>
<hr color="#66CC33" size="1px" style="border-style:dashed"/>
<%
	}
}
%>
</div>
<div id=mainContent-bottomimg></div></div></div>
<%@ include file="/sidebar.jsp"%>
<%@ include file="/footer.jsp" %>
</body>
</html>
